import React from 'react'
import ReactDOM from 'react-dom'
import Home from './components/Home.jsx'
import Welcome from './welcome/index.jsx'
import { HashRouter as Router, Route, Link , Redirect ,Switch} from 'react-router-dom'
import 'antd/dist/antd.css'
import './index.less'

class App extends React.Component {
    render() {
        return (
            <Router>
                <Switch>
                    {/* <Redirect from="/home" to="/home/demand"/> */}
                    <Route path="/welcome" component={Welcome}/>
                    <Route path="/home" component={Home}/>
                    <Redirect from="/" to={{
                        pathname:'/welcome',
                        state: { 'fromRoot': true }
                    }}/>
                    {/* <Redirect from="/home" to="/home/demand"/> */}
                </Switch>
            </Router>
        )
    }
}

ReactDOM.render(
    <App/>,
    document.getElementById('app')
)